package collection;

import java.util.ArrayList;
import java.util.Collection;

//集合保存引用类型元素，并且保存的是元素的引用
public class ArrayListObject {
    public static void main(String[] args) {
        Collection <Point> c =new ArrayList<>();
        Point p=new Point(1,2);
        c.add(p);
        System.out.println(c);
        System.out.println(p);
    }
}
